Copenhagen Ph . D . Dissertation Tom Hvitved Contract Formalisation and Modular Implementation of Domain - Specific Languages
نویسنده
چکیده
This dissertation encompasses the topics contract formalisation, domainspecific languages implementation, and enterprise resource planning systems. The dissertation is a collection of six independent chapters, two of which are published papers, two of which are extended versions of published papers, and two of which are unpublished manuscripts. Our contributions to the field of contract formalisation covers three chapters. The first chapter is a comprehensive, comparative survey of previous work on formal languages and models for legally binding contracts. We provide a list of key requirements for formalising contracts, which serves both as our comparison measure, and as a guideline for future formalisms. We conclude that, although much work has been carried out in the field, much remains to be done. In particular, only very few previous approaches present a clear, formal semantics. To this end, we propose a novel, formal model of legally binding contracts in the second chapter. Besides striving for an unambiguous, formal semantics, we focus on a model that properly accounts for blame assignment. That is, our contract model takes into account that a breach of contract must be attributable to one or more of the contract participants. In the third chapter we shift the focus from legally binding contracts to contracts for distributed programming. We propose a fundamentally new generalisation of the traditional programming-by-contract paradigm, which gives rise to a game-theoretic view on distributed-programming contracts. Perhaps surprisingly, many aspects of contracts for distributed programming and traditional legally binding contracts turn out to coincide. Our contributions to the field of domain-specific languages implementation covers two chapters. We introduce a Haskell library for constructing data types, and functions on them, in a modular and extendable fashion. Our library targets implementations of domain-specific languages, in which the abstract syntax trees (ASTs) are represented as elements of a recursive algebraic data type. The shortcoming of the traditional approach is that it is missing modularity, and typically we find ourselves implementing AST transformations for which the type system does not properly account for the underlying invariants (also known as the Expression Problem). In the first of the two chapters we introduce our library, which enables full modularity and extensibility, as well as seamless support for AST annotations and run-time optimisation in the vein of deforestation. In the second chapter we extend our library with support for variable binders. We use a restricted form of higher-order abstract syntax that permits effective recursion schemes, as well as transformations on higher-order ASTs. In the final chapter we present a novel software architecture for enterprise resource planning (ERP) systems, based on domain-specific languages. This chapter ties together the previous chapters, by drawing on our domain-specific language for contracts and our Haskell library of compositional data types. We present a detailed overview of our architecture, as well as the domain-specific languages for specifying the data model, reports, and contracts respectively. The data model defines objects that we want to model, such as customers; the reports define the information we want to derive from the transactions in the system, such as current balance; and the contracts define the expected future transactions, such as payments. We demonstrate the validity of our approach by means of a use case, in which we implement a small ERP system from scratch. The implementation that we obtain is but a fraction of the code in normal ERP systems, and the domain-specific style yields specifications that are much closer to the informal, textual requirements than the corresponding implementations in standard ERP systems.
منابع مشابه
A Survey of Formal Languages for Contracts
In this short paper we present the current status on formal languages and models for contracts. By a formal model is meant an unambiguous and rigorous representation of contracts, in order to enable their automatic validation, execution, and analysis — activates that are collectively referred to as contract lifecycle management (CLM). We present a set of formalism requirements, which represent ...
متن کاملDomain-Specific Languages for Enterprise Systems
The process-oriented event-driven transaction systems (POETS) architecture introduced by Henglein et al. is a novel software architecture for enterprise resource planning (ERP) systems. POETS employs a pragmatic separation between (i) transactional data, that is what has happened; (ii) reports, that is what can be derived from the transactional data; and (iii) contracts, that is which transacti...
متن کاملDomain-Specific Modelling Languages in Bigraphs
Modelling is a ubiquitous activity in human endeavours, and the construction of informatic models of many kinds is the key to understanding and managing the complexity of an increasingly computational world. We advocate the use of domain-specific modelling languages, instantiated within a “tower” of models, in order to improve the utility of the models we build, and to ease the process of model...
متن کاملA Game-Theoretic Model for Distributed Programming by Contract
We present an extension of the programming-by-contract (PBC) paradigm to a concurrent and distributed environment. Classical PBC is characterized by absolute conformance of code to its specification, assigning blame in case of failures, and a hierarchical, cooperative decomposition model – none of which extend naturally to a distributed environment with multiple administrative peers. We therefo...
متن کاملParametric Compositional Data Types
In previous work we have illustrated the benefits that compositional data types (CDTs) offer for implementing languages and in general for dealing with abstract syntax trees (ASTs). Based on Swierstra’s data types à la carte, CDTs are implemented as a Haskell library that enables the definition of recursive data types and functions on them in a modular and extendable fashion. Although CDTs prov...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2012